---
layout: "default"
title: "Operator: prefix !"
description: "Swift documentation for the 'prefix !' operator."
root: "/v1.2"
---

<code class="language-swift">prefix operator prefix ! {
    associativity 
    precedence 
}</code>

<h3>Declarations</h3>

<div class="declaration" id="func-excl_-bool">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-excl_-bool">prefix func !(<wbr>_: Bool)</a>
        
<div class="comment collapse" id="comment-func-excl_-bool"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func !(a: Bool) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-excl-t_-booleantype_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-excl-t_-booleantype_-t">prefix func <wbr>! &lt;T : BooleanType&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-excl-t_-booleantype_-t"><div class="p">
    <p>Return the result of inverting <code>a</code>&#39;s logic value</p>

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func !&lt;T : BooleanType&gt;(a: T) -&gt; Bool</code>
    
    
</div></div>
</div>
